package com.ruoyi.project.filemgr.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.filemgr.mapper.ShareMonitorMapper;
import com.ruoyi.project.filemgr.domain.ShareMonitor;
import com.ruoyi.project.filemgr.service.IShareMonitorService;

/**
 * 监控Service业务层处理
 * 
 * @author filemgr
 * @date 2024-02-02
 */
@Service
public class ShareMonitorServiceImpl implements IShareMonitorService 
{
    @Autowired
    private ShareMonitorMapper shareMonitorMapper;

    /**
     * 查询监控
     * 
     * @param id 监控主键
     * @return 监控
     */
    @Override
    public ShareMonitor selectShareMonitorById(Long id)
    {
        return shareMonitorMapper.selectShareMonitorById(id);
    }

    /**
     * 查询监控列表
     * 
     * @param shareMonitor 监控
     * @return 监控
     */
    @Override
    public List<ShareMonitor> selectShareMonitorList(ShareMonitor shareMonitor)
    {
        return shareMonitorMapper.selectShareMonitorList(shareMonitor);
    }

    /**
     * 新增监控
     * 
     * @param shareMonitor 监控
     * @return 结果
     */
    @Override
    public int insertShareMonitor(ShareMonitor shareMonitor)
    {
        shareMonitor.setCreateTime(DateUtils.getNowDate());
        return shareMonitorMapper.insertShareMonitor(shareMonitor);
    }

    /**
     * 修改监控
     * 
     * @param shareMonitor 监控
     * @return 结果
     */
    @Override
    public int updateShareMonitor(ShareMonitor shareMonitor)
    {
        shareMonitor.setUpdateTime(DateUtils.getNowDate());
        return shareMonitorMapper.updateShareMonitor(shareMonitor);
    }

    /**
     * 批量删除监控
     * 
     * @param ids 需要删除的监控主键
     * @return 结果
     */
    @Override
    public int deleteShareMonitorByIds(Long[] ids)
    {
        return shareMonitorMapper.deleteShareMonitorByIds(ids);
    }

    /**
     * 删除监控信息
     * 
     * @param id 监控主键
     * @return 结果
     */
    @Override
    public int deleteShareMonitorById(Long id)
    {
        return shareMonitorMapper.deleteShareMonitorById(id);
    }
}
